import Vue from 'vue'
import VueRouter from 'vue-router'
import showView from '@/components/showView'
import addView from '@/components/addView'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/show'
  },
  {
    path: '/show',
    component: showView
  },
  {
    path: '/add',
    component: addView
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes,
  linkActiveClass: 'active'
})

export default router
